



//
//  JCTest.m
//  JCSDK
//
//  Created by master on 16/2/25.
//  Copyright © 2016年 AdMaster. All rights reserved.
//

#import "JCTest.h"
#import "JCObjectSerializer.h"
#import "JCObjectIdentityProvider.h"
#import "JCObjectSerializerConfig.h"
#import "JCObjectSerializerContext.h"
#import "JCEventBinding.h"
@implementation JCTest

+ (NSDictionary *)serializer {
    NSData *jsonData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"snapshot_config" ofType:@"json"]];
    
    NSDictionary *configDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableLeaves error:nil];
    JCObjectSerializerConfig *configure = [[JCObjectSerializerConfig alloc] initWithDictionary:configDictionary];
    JCObjectIdentityProvider *provider = [[JCObjectIdentityProvider alloc] init];
    
    JCObjectSerializer *serializer = [[JCObjectSerializer alloc] initWithConfiguration:configure objectIdentifyProvider:provider];
    return [serializer objectHierarchyForWindowAtIndex:0];
    
}

+ (void)bind {

    NSDictionary *bindDict = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"property" ofType:@"plist"]];
    JCEventBinding *eventBinding = [JCEventBinding bindingWithJSONObject:bindDict];
    [eventBinding execute];
    
    
    
}

@end
